Skip to content

Comments

feat(userlib): Bump Motoko and support principal type in userlib#433

Merged
hansl merged 8 commits intomasterfrom
idl-ref
Mar 11, 2020
Merged

feat(userlib): Bump Motoko and support principal type in userlib#433
hansl merged 8 commits intomasterfrom
idl-ref

Conversation

@chenyan-dfinity
Copy link
Contributor

@chenyan-dfinity chenyan-dfinity commented Mar 6, 2020

  • Bump motoko
  • Name change: Unit --> Null
  • Principal types in JS
git log --oneline --first-parent 788395608cdf75ecdff3c904bef52f2478467d5f..849cfba0b8dead6c6e5de0905491f9e33631eb32 src stdlib rts | cat
849cfba0 Fix for unsorted recorded fields after pattern inference (#1278)
44362755 update rts to decode principal (#1273)
8cccfe28 fix bug in mo_to_idl (#1275)
a856438d Add Principal to IDL (#1268)
71b3f980 Suppress inference for explicitly empty instantiations (#1265)
b9f7a808 Claudio/inference (#1242)
4a9cc844 Nix: Fetch ic-stub from ic-ref repo (#1243)
1ba12521 Basic upgrade infrastructure (#1199)
604f05e4 RTS: Track canister lifecycle state machine (#1231)
1b023617 Functorizes type pretty printing and hides stamps from IDE types (#1240)
31aa7aed Normalises file paths before sending them to the editors (#1237)
540bdeb0 Some more IDE fixes for the demo (#1236)
7a262e5b RTS: Put hash list of objects into static memory (#1233)
5dc2ad3c Some IDE robustness fixes (#1235)
2fd8bbb7 Separate diagnostics for beginning and end of scope (#1229)
97e4f2bd Completions and auto-imports for canisters (#1222)
0d827fe7 Improve error messages for scoped awaits (#1221)
95585009 Scans the passed package paths for .mo files (#1210)
3f9bb991 Backend: Implement eq on `Principal` (#1206)
ea327679 RTS: Fix utf8 validation bug (#1213)
05f41e1c Reports diagnostics at startup (#1215)
be2667f6 filters out completions that would lead to self-imports (#1214)
11ad5576 Bug fix in tabulateVar (#1207)
74dfa8cd Stdlib: add Nat/Int.min/max (#1205)
b81ba4bf Automatically import on completion (#1198)

@chenyan-dfinity chenyan-dfinity changed the title feat(userlib): support reference types feat(userlib): Bump Motoko and support reference types Mar 6, 2020
@chenyan-dfinity chenyan-dfinity changed the title feat(userlib): Bump Motoko and support reference types feat(userlib): Bump Motoko and support principal type in userlib Mar 7, 2020
return this._idHex;
}
public toText(): string {
return 'ic:' + this.toHex() + '00';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don’t forget a // TODO here :-)

@chenyan-dfinity chenyan-dfinity marked this pull request as ready for review March 10, 2020 15:54
@chenyan-dfinity chenyan-dfinity requested a review from a team March 10, 2020 15:54
@chenyan-dfinity chenyan-dfinity requested a review from a team as a code owner March 10, 2020 15:54
if (hex.length % 2 === 0 && /^[0-9A-F]+$/.test(hex)) {
// Remove the checksum from the hexadecimal.
// TODO: validate the checksum.
return this.fromHex(hex.slice(0, -2));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't fromHex fail here actually? (I thought it was failing.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fromHex just stores the string. It doesn't do any checks.

Copy link
Contributor

@eftychis eftychis Mar 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. I can swear I had added checks in encode decode functions somewhere...

carry on 😉

.toString('hex')
.toUpperCase();
// TODO implement checksum
return CanisterId.fromText('ic:' + hex + '00');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good, but perhaps we need to centralize all this in a IC identifier library?? I am going to add senders for instance which is more of the same logic. And this is canister id specific. (No change asked for this PR, just asking, as I want to do something similar.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. Same applies to Rust. canisterId is defined inside the ic_http_agent crate. Probably separate that out as well.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I have been pondering that. Not sure which option is the best.

Copy link
Contributor

@hansl hansl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking this for now while I investigate a problem with master.

@eftychis
Copy link
Contributor

@hansl Any pointers as to what you are investigating?

Copy link
Contributor

@hansl hansl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving and merging this as it seems master is green (and so is this PR). I don't know why a bug with reply happened to some people (including the Node E2E PR).

@hansl hansl merged commit cda3ab5 into master Mar 11, 2020
@chenyan-dfinity chenyan-dfinity deleted the idl-ref branch March 11, 2020 17:48
dfinity-bot added a commit that referenced this pull request Oct 26, 2020
## Changelog for advisory-db:
Branch: master
Commits: [rustsec/advisory-db@6e48979d...0ad26bc7](rustsec/advisory-db@6e48979...0ad26bc)

* [`5751a5f4`](rustsec/advisory-db@5751a5f) CI: bump rustsec-admin to v0.3.0-pre2 ([RustSec/advisory-db⁠#438](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/438))
* [`65441901`](rustsec/advisory-db@6544190) Add unmaintained crate advisory for stdweb ([RustSec/advisory-db⁠#439](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/439))
* [`acc73d95`](rustsec/advisory-db@acc73d9) CI: bump rustsec-admin to v0.3.0-pre3 ([RustSec/advisory-db⁠#440](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/440))
* [`691a7504`](rustsec/advisory-db@691a750) Assigned RUSTSEC-2020-0056 to stdweb ([RustSec/advisory-db⁠#441](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/441))
* [`8505c957`](rustsec/advisory-db@8505c95) Add unmaintained crate advisory for `block-cipher` ([RustSec/advisory-db⁠#442](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/442))
* [`fa616899`](rustsec/advisory-db@fa61689) Assigned RUSTSEC-2020-0057 to block-cipher ([RustSec/advisory-db⁠#443](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/443))
* [`5c9ebbfa`](rustsec/advisory-db@5c9ebbf) Add unmaintained crate advisory for `stream-cipher` ([RustSec/advisory-db⁠#444](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/444))
* [`218de91a`](rustsec/advisory-db@218de91) Assigned RUSTSEC-2020-0058 to stream-cipher ([RustSec/advisory-db⁠#445](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/445))
* [`681a2040`](rustsec/advisory-db@681a204) Add advisory for notable UB fix in libpulse-binding v2.6.0 ([RustSec/advisory-db⁠#435](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/435))
* [`1e48ac39`](rustsec/advisory-db@1e48ac3) Assigned RUSTSEC-2019-0038 to libpulse-binding ([RustSec/advisory-db⁠#446](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/446))
* [`59bee556`](rustsec/advisory-db@59bee55) Add advisory for use-after-frees fixed in libpulse-binding v1.2.1 ([RustSec/advisory-db⁠#433](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/433))
* [`146de2d8`](rustsec/advisory-db@146de2d) Assigned RUSTSEC-2018-0021 to libpulse-binding ([RustSec/advisory-db⁠#447](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/447))
* [`3b1f08f2`](rustsec/advisory-db@3b1f08f) Unyank RUSTSEC-2020-0011 ([RustSec/advisory-db⁠#448](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/448))
* [`3796cc00`](rustsec/advisory-db@3796cc0) README.md: point chat badge to Zulip ([RustSec/advisory-db⁠#449](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/449))
* [`1bf68e0d`](rustsec/advisory-db@1bf68e0) RUSTSEC-2020-0015: use wildcards in version req ([RustSec/advisory-db⁠#450](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/450))
* [`67a2144b`](rustsec/advisory-db@67a2144) RUSTSEC-2020-0015: remove wildcards ([RustSec/advisory-db⁠#451](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/451))
* [`0ad26bc7`](rustsec/advisory-db@0ad26bc) Bump `rustsec-admin` to v0.3.0 ([RustSec/advisory-db⁠#452](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/452))
mergify bot pushed a commit that referenced this pull request Oct 26, 2020
## Changelog for advisory-db:
Branch: master
Commits: [rustsec/advisory-db@6e48979d...0ad26bc7](rustsec/advisory-db@6e48979...0ad26bc)

* [`5751a5f4`](rustsec/advisory-db@5751a5f) CI: bump rustsec-admin to v0.3.0-pre2 ([RustSec/advisory-db⁠#438](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/438))
* [`65441901`](rustsec/advisory-db@6544190) Add unmaintained crate advisory for stdweb ([RustSec/advisory-db⁠#439](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/439))
* [`acc73d95`](rustsec/advisory-db@acc73d9) CI: bump rustsec-admin to v0.3.0-pre3 ([RustSec/advisory-db⁠#440](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/440))
* [`691a7504`](rustsec/advisory-db@691a750) Assigned RUSTSEC-2020-0056 to stdweb ([RustSec/advisory-db⁠#441](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/441))
* [`8505c957`](rustsec/advisory-db@8505c95) Add unmaintained crate advisory for `block-cipher` ([RustSec/advisory-db⁠#442](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/442))
* [`fa616899`](rustsec/advisory-db@fa61689) Assigned RUSTSEC-2020-0057 to block-cipher ([RustSec/advisory-db⁠#443](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/443))
* [`5c9ebbfa`](rustsec/advisory-db@5c9ebbf) Add unmaintained crate advisory for `stream-cipher` ([RustSec/advisory-db⁠#444](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/444))
* [`218de91a`](rustsec/advisory-db@218de91) Assigned RUSTSEC-2020-0058 to stream-cipher ([RustSec/advisory-db⁠#445](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/445))
* [`681a2040`](rustsec/advisory-db@681a204) Add advisory for notable UB fix in libpulse-binding v2.6.0 ([RustSec/advisory-db⁠#435](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/435))
* [`1e48ac39`](rustsec/advisory-db@1e48ac3) Assigned RUSTSEC-2019-0038 to libpulse-binding ([RustSec/advisory-db⁠#446](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/446))
* [`59bee556`](rustsec/advisory-db@59bee55) Add advisory for use-after-frees fixed in libpulse-binding v1.2.1 ([RustSec/advisory-db⁠#433](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/433))
* [`146de2d8`](rustsec/advisory-db@146de2d) Assigned RUSTSEC-2018-0021 to libpulse-binding ([RustSec/advisory-db⁠#447](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/447))
* [`3b1f08f2`](rustsec/advisory-db@3b1f08f) Unyank RUSTSEC-2020-0011 ([RustSec/advisory-db⁠#448](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/448))
* [`3796cc00`](rustsec/advisory-db@3796cc0) README.md: point chat badge to Zulip ([RustSec/advisory-db⁠#449](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/449))
* [`1bf68e0d`](rustsec/advisory-db@1bf68e0) RUSTSEC-2020-0015: use wildcards in version req ([RustSec/advisory-db⁠#450](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/450))
* [`67a2144b`](rustsec/advisory-db@67a2144) RUSTSEC-2020-0015: remove wildcards ([RustSec/advisory-db⁠#451](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/451))
* [`0ad26bc7`](rustsec/advisory-db@0ad26bc) Bump `rustsec-admin` to v0.3.0 ([RustSec/advisory-db⁠#452](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/452))
dfinity-bot added a commit that referenced this pull request Jun 10, 2021
mergify bot pushed a commit that referenced this pull request Jun 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants